{% extends "mall_base.html" %}
{% block title %}
    <title>推荐商品</title>
{% endblock %}

{% block content %}

    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <h3>店长推荐</h3>
                <hr>
            </div>
        </div>
        <div class="row">
            {% for recommend in recommend_list %}
                {% for goods in goods_list %}
                    {% if recommend.goods_id == goods.id and recommend.status == 0%}

            <div class="col-md-3">
                <div class="thumbnail">
                    <img src="{{ goods.picture}}" alt="{{goods.name }}">
                    <div class="caption">
                        <h4>{{ goods.name }}</h4>
                        <p>￥{{ goods.price }}</p>
                        <p>
                            <a href="/cart/{{ goods.id }}" class="btn btn-primary" role="button">加入购物车</a>
                            <a href="/cart/{{ goods.id }}" class="btn btn-default" role="button">查看详情</a>

                        </p>
                    </div>
                </div>
            </div>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        </div>

    <div class="row">
            <div class="col-md-12">
                <h3>热销商品</h3>
                <hr>
            </div>
        </div>
        <div class="row">
            {% for recommend in recommend_list %}
                {% for goods in goods_list %}
                    {% if recommend.goods_id == goods.id and recommend.status == 1 %}

            <div class="col-md-3">
                <div class="thumbnail">
                    <img src="{{ goods.picture}}" alt="{{goods.name }}">
                    <div class="caption">
                        <h4>{{ goods.name }}</h4>
                        <p>￥{{ goods.price }}</p>
                        <p>
                            <a href="/cart/{{ goods.id }}" class="btn btn-primary" role="button">加入购物车</a>
                            <a href="/cart/{{ goods.id }}" class="btn btn-default" role="button">查看详情</a>

                        </p>
                    </div>
                </div>
            </div>
                    {% endif %}
                {% endfor %}
            {% endfor %}
        </div>
    </div>
{% endblock %}

